<?php $this->headLink()->appendStylesheet($this->baseUrl() . '/css/breadcrumbs.css') ?>

<?php
$currStep = $this->bean->currentStep;
function checkBreadcrumbsStyle($id, $bean) {
    $currStep = $bean->currentStep;
    $styleClass = "inactive";
    if ($currStep == $id) {
        $styleClass = "active";
    } else if ($currStep > $id) {
        $styleClass = "passed";
    }
    return $styleClass;
}
?>

<div class="breadcrumbs-box">
    <div class="breadcrumbs-subbox user-value <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_TYPE, $this->bean) ?>">
        <?= $this->translate('XXX_CATALOG_BREADCRUMBS_STEP_TYPE') ?>
        <?php if (!empty($this->bean->type) && $currStep != Application_Model_DAO_Catalog::STEP_TYPE): ?>
            <div class="user-value"> 
                <?= $this->bean->type == 'free' ? $this->translate('XXX_CATALOG_BREADCRUMBS_STEP_TYPE_FREE') : $this->translate('XXX_CATALOG_BREADCRUMBS_STEP_TYPE_PAID') ?>
            </div>
        <?php endif ?>
    </div>
    <div class="breadcrumbs-array <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_TYPE, $this->bean) ?>"></div>
    <div class="breadcrumbs-subbox <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_FORM, $this->bean) ?>">
        <?= $this->translate('XXX_CATALOG_BREADCRUMBS_STEP_FORM') ?>
    </div>
    <div class="breadcrumbs-array <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_FORM, $this->bean) ?>"></div>
    <div class="breadcrumbs-subbox <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_PREVIEW, $this->bean) ?>">
        <?= $this->translate('XXX_CATALOG_BREADCRUMBS_STEP_PREVIEW') ?>
    </div>
    <div class="breadcrumbs-array <?= checkBreadcrumbsStyle(Application_Model_DAO_Catalog::STEP_PREVIEW, $this->bean) ?>"></div>
    <div class="clearfix"></div>
</div>